{extend name="template/base" /}
{block name="content"}
<head>


    <style type="text/css">

        .select {
            border: 0px;
            outline: 1px solid rgb(204,204,204);
            padding: 5px;
            width: 150px;
            height: 30px;
        }

    </style>

</head>
<div style="margin-top: 30px;" class="page-container">
    <form class="form form-horizontal" id="form" method="post" action="{:\\think\\Request::instance()->baseUrl()}">
        <input type="hidden" name="id" value="{$vo.id ?? ''}">
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>业务编码：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" placeholder="业务编码" name="code" value="{$vo.code ?? ''}"  datatype="*" nullmsg="请填写业务编码">
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>业务名称：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" placeholder="业务名称" name="name" value="{$vo.name ?? ''}"  datatype="*" nullmsg="请填写业务名称">
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>业务类别：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <select class="select" name = "category">

                    {volist name="groups" id="cat"}

                     <option id="{$cat.name}" value ="{$cat.name}">{$cat.name}</option>

                    {/volist}

                </select>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>


        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>业务流程：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <select class="select" name = "buss_flow">

                    {volist name="Article_groups" id="Article"}

                     <option id="{$Article.id}" value ="{$Article.id}">{$Article.name}</option>


                    {/volist}

                </select>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>



        <div class="row cl">

            <label class="form-label col-xs-3 col-sm-3">业务说明：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" placeholder="业务说明" name="content" value="{$vo.content ?? ''}" >
            </div>
            <div class="col-xs-3 col-sm-3"></div>

        </div>

        <div class="row cl">

            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>状态：</label>

            <div class="formControls col-xs-6 col-sm-6 skin-minimal">
                <div class="radio-box">
                    <input type="radio" name="status" id="status-1" value="1" datatype="*" nullmsg="请选择状态">
                    <label for="status-1">启用</label>
                </div>

                <div class="radio-box">
                    <input type="radio" name="status" id="status-0" value="0" datatype="*" nullmsg="请选择状态">
                    <label for="status-0">禁用</label>
                </div>

            </div>

            <div class="col-xs-3 col-sm-3"></div>

        </div>


        <div class="row cl">

            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <button type="submit" class="btn btn-primary radius">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>
                <button type="button" class="btn btn-default radius ml-20" onClick="layer_close();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>

        </div>


    </form>
</div>
{/block}
{block name="script"}
<script type="text/javascript" src="__LIB__/Validform/5.3.2/Validform.min.js"></script>
<script>
    $(function () {

        $("[name='status'][value='{$vo.status ?? ''}']").prop("checked", true);

        $("#{$vo.buss_flow ?? ''}").prop("selected", true);

        $("#{$vo.category ?? ''}").prop("selected", true);


        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });


        $("#form").Validform({
            tiptype: 2,
            ajaxPost: true,
            showAllError: true,
            callback: function (ret){
                ajax_progress(ret);
            }
        });

    })
</script>
{/block}
